package com.xsd.responsibilitychain;

/**
 * @Description: 系 处理者
 * @Author: zhoufuzong
 * @Created: 2021-03-07 22:03:09
 * @Version: 1.1.0
 */

public class DepartmentApprover extends Approver{

    public DepartmentApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest purchaseRequest) {
        if (purchaseRequest.getPrice()<=5000){
            System.out.println("请求编号id ="+purchaseRequest.getId()+"被"+this.name+"处理");
        }else {
            approver.processRequest(purchaseRequest);

        }
    }
}
